package com.jfl.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jfl.model.SysRoleMenu;

/**
 * <一句话功能简述>
 *  
 * @author  赵炎
 * @version  [V1.00, 2019年1月13日]
 * @since V1.00
 */
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu>
{

    @Delete("delete from tbl_sys_role_menu where role_id = #{roleId}")
    int deleteByRoleId(Long roleId);

    @Select("select count(1) from tbl_sys_role_menu where role_id = #{roleId}")
    int countByRoleId(Long roleId);

    @Select("select count(1) from tbl_sys_role_menu where menu_id = #{menuId}")
    int countByMenuId(Long menuId);
    
}
